package com.ims.metnum.utils;

public class RoundDecimal {
	
	public static double roundDouble(double decimalNumber, int significantDigits){
		double divisor = Math.pow(10, (double)significantDigits);
		double result= decimalNumber * divisor;
		long number = (long) result;
		result = (double) number;
		result = result / divisor;
		return result;
	}
	
	public static float roundFloat(float decimalNumber, int significantDigits){
		return (float)roundDouble((double)decimalNumber, significantDigits);
	}
	
}
